/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 打击感动画 */
@keyframes damageNumber {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translateY(-30px) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(-60px) scale(0.8);
        opacity: 0;
    }
}

@keyframes enemyHit {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

@keyframes enemyFlash {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.5) contrast(1.2);
    }
}

@keyframes screenShake {
    0%, 100% {
        transform: translate(0, 0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translate(-2px, -2px);
    }
    20%, 40%, 60%, 80% {
        transform: translate(2px, 2px);
    }
}

@keyframes cardUse {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
        filter: brightness(1.3);
    }
    100% {
        transform: scale(0.8) rotate(-5deg);
        opacity: 0;
    }
}

@keyframes healthBarDecrease {
    0% {
        width: var(--old-width);
    }
    100% {
        width: var(--new-width);
    }
}

.damage-number {
    position: absolute;
    font-size: 2rem;
    font-weight: bold;
    color: #ff4444;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px #ff0000;
    pointer-events: none;
    z-index: 1000;
    animation: damageNumber 1s ease-out forwards;
    user-select: none;
}

.enemy-hit {
    animation: enemyHit 0.3s ease-in-out;
}

.enemy-flash {
    animation: enemyFlash 0.2s ease-in-out;
}

.screen-shake {
    animation: screenShake 0.5s ease-in-out;
}

@keyframes screenShakeLight {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-1px, -1px);
    }
}

.screen-shake-light {
    animation: screenShakeLight 0.3s ease-in-out;
}

@keyframes playerHurt {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.5) contrast(1.2) hue-rotate(10deg);
    }
}

.player-hurt {
    animation: playerHurt 0.3s ease-in-out;
}

.player-damage {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ff6666;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px #ff0000;
    pointer-events: none;
    z-index: 1000;
    animation: damageNumber 1s ease-out forwards;
}

.card-using {
    animation: cardUse 0.4s ease-out forwards;
    z-index: 100;
}

/* 能量不足警告动画 */
@keyframes energyWarning {
    0%, 100% { 
        transform: scale(1);
        color: #4ecdc4;
    }
    25% { 
        transform: scale(1.2);
        color: #ff4444;
        text-shadow: 0 0 10px #ff4444;
    }
    50% { 
        transform: scale(1.1);
        color: #ff6666;
    }
    75% { 
        transform: scale(1.2);
        color: #ff4444;
        text-shadow: 0 0 10px #ff4444;
    }
}

@keyframes cardInsufficientEnergy {
    0%, 100% { 
        transform: translateX(0);
        border-color: rgba(255, 255, 255, 0.3);
    }
    10%, 30%, 50%, 70%, 90% { 
        transform: translateX(-5px);
        border-color: #ff4444;
        box-shadow: 0 0 15px rgba(255, 68, 68, 0.6);
    }
    20%, 40%, 60%, 80% { 
        transform: translateX(5px);
        border-color: #ff4444;
        box-shadow: 0 0 15px rgba(255, 68, 68, 0.6);
    }
}

.energy-insufficient {
    animation: energyWarning 1.5s ease-in-out;
    font-weight: bold;
}

.card-insufficient-energy {
    animation: cardInsufficientEnergy 0.8s ease-in-out;
    cursor: not-allowed !important;
}

.health-bar-decrease {
    transition: width 0.5s ease-out;
}

/* 连击文字 */
.combo-text {
    position: absolute;
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px #ffd700;
    pointer-events: none;
    z-index: 1001;
    animation: comboPulse 0.5s ease-out;
    user-select: none;
}

@keyframes comboPulse {
    0% {
        transform: translateX(-50%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.8;
    }
}

/* 暴击文字 */
.crit-text {
    position: absolute;
    font-size: 2rem;
    font-weight: bold;
    color: #ff0000;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9), 0 0 20px #ff0000;
    pointer-events: none;
    z-index: 1002;
    animation: critFlash 0.8s ease-out;
    user-select: none;
}

@keyframes critFlash {
    0% {
        transform: translate(-50%, -50%) scale(0.5) rotate(-10deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3) rotate(5deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 0;
    }
}

/* 粒子特效 */
.hit-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999;
    animation: particleFly 0.5s ease-out forwards;
}

.crit-particle {
    width: 6px;
    height: 6px;
    background: #ff4444;
    box-shadow: 0 0 8px #ff4444;
}

@keyframes particleFly {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--end-x, 0), var(--end-y, 0));
        opacity: 0;
    }
}

/* 卡牌悬停高亮 */
.card-hover {
    transform: translateY(-10px) scale(1.05) !important;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6) !important;
    filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    transition: all 0.2s ease;
    z-index: 50;
}

/* 敌人血条分段 */
.health-bar-container {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin: 5px 0;
}

.health-bar {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 10px;
}

.health-fill {
    height: 100%;
    transition: width 0.5s ease-out;
    border-radius: 10px;
}

.health-bar-normal .health-fill {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.health-bar-warning .health-fill {
    background: linear-gradient(90deg, #FF9800, #FFC107);
}

.health-bar-danger .health-fill {
    background: linear-gradient(90deg, #f44336, #ff6b6b);
    animation: dangerPulse 1s ease-in-out infinite;
}

@keyframes dangerPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.health-text {
    font-size: 0.9rem;
    color: white;
    margin-top: 3px;
}

/* 奖励动画 */
@keyframes goldPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
        color: #ffd700;
        text-shadow: 0 0 10px #ffd700;
    }
    100% {
        transform: scale(1);
    }
}

@keyframes potionPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
        color: #4ecdc4;
        text-shadow: 0 0 10px #4ecdc4;
    }
    100% {
        transform: scale(1);
    }
}

.potion-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.potion-clickable:hover {
    color: #6ee7d8 !important;
    text-shadow: 0 0 8px #4ecdc4;
}

@keyframes cardClaim {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

.reward-card.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

.reward-card:hover:not(.disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 卡牌稀有度边框样式 */
.rarity-common {
    border: 2px solid #cccccc !important;
    box-shadow: 0 2px 4px rgba(204, 204, 204, 0.3);
}

.rarity-uncommon {
    border: 2px solid #4a90e2 !important;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.4);
}

.rarity-rare {
    border: 2px solid #ffd700 !important;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%) !important;
}

/* 手牌中的稀有度边框 */
.card.rarity-common {
    border: 2px solid #cccccc;
}

.card.rarity-uncommon {
    border: 2px solid #4a90e2;
    box-shadow: 0 3px 12px rgba(74, 144, 226, 0.4);
}

.card.rarity-rare {
    border: 2px solid #ffd700;
    box-shadow: 0 3px 15px rgba(255, 215, 0, 0.6);
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* 屏幕切换 */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.screen.active {
    display: flex;
}

/* 主菜单样式 */
.menu-content {
    text-align: center;
    max-width: 800px;
    padding: 20px;
}

.game-title {
    font-size: 3rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 10px;
}

.game-subtitle {
    font-size: 1.2rem;
    color: #e0e0e0;
    margin-bottom: 40px;
}

/* 角色选择 */
.character-selection h2 {
    color: #fff;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.character-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.character-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    width: 180px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    text-align: center;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.character-card.selected {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.character-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.character-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.character-card h3 {
    color: #333;
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.character-card p {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

/* 地图界面 */
.map-header {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.map-content {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

.map-title {
    text-align: center;
    color: white;
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.map-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin-bottom: 20px;
}

.map-floor {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    width: 100%;
}

.map-node {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.map-node:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.map-node.available {
    opacity: 1;
}

.map-node.unavailable {
    opacity: 0.3;
    cursor: not-allowed;
}

.map-node.visited {
    opacity: 0.6;
}

.map-node.current {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.map-node.locked {
    opacity: 0.2;
    cursor: not-allowed;
    background: #666 !important;
    border: 2px dashed #999;
}

/* 节点类型样式 */
.battle-node {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
}

.elite-node {
    background: linear-gradient(45deg, #ffd93d, #ffb347);
}

.boss-node {
    background: linear-gradient(45deg, #8b0000, #dc143c);
}

.hanfu-node {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.shop-node {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

.map-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.9rem;
}

.legend-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.battle-icon {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
}

.elite-icon {
    background: linear-gradient(45deg, #ffd93d, #ffb347);
}

.boss-icon {
    background: linear-gradient(45deg, #8b0000, #dc143c);
}

.hanfu-icon {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.shop-icon {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

/* 游戏界面 */
.game-header {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.player-info {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
}

.player-avatar-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.player-stats {
    display: flex;
    gap: 20px;
    font-size: 1.1rem;
}

.health { color: #ff6b6b; }
.energy { color: #4ecdc4; }
.gold { color: #ffd93d; }

.potion-section {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.potions-label {
    color: #fff;
    font-weight: bold;
}

.potions-display {
    display: flex;
    gap: 8px;
    align-items: center;
}

.potion-icon {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #ffd93d;
    font-weight: bold;
}

.potion-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #ffd93d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* 遗物显示样式 */
.relic-section {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 1rem;
    flex-wrap: wrap;
    min-width: 200px;
    flex: 1;
}

.relics-label {
    color: #fff;
    font-weight: bold;
}

.relics-display {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 32px;
    max-width: 100%;
}

.relic-icon {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    color: #ffd93d;
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 0 0 3px rgba(255, 217, 61, 0.5);
}

/* 遗物稀有度边框 */
.relic-icon.rarity-common {
    border-color: rgba(255, 255, 255, 0.3);
}

.relic-icon.rarity-uncommon {
    border-color: #4ecdc4;
    box-shadow: 0 0 8px rgba(78, 205, 196, 0.4);
}

.relic-icon.rarity-rare {
    border-color: #ffd93d;
    box-shadow: 0 0 10px rgba(255, 217, 61, 0.5);
}

.relic-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.relic-more {
    color: #ccc;
    font-size: 0.9rem;
    font-style: italic;
    cursor: help;
}

/* 遗物完整列表显示 */
.relics-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.relics-display-full {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 32px;
    max-width: 100%;
}

/* 遗物查看界面样式 */
.relics-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.relic-item {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.relic-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* 遗物稀有度边框（查看界面） */
.relic-item.rarity-common {
    border-color: rgba(255, 255, 255, 0.3);
}

.relic-item.rarity-uncommon {
    border-color: #4ecdc4;
    box-shadow: 0 0 12px rgba(78, 205, 196, 0.4);
}

.relic-item.rarity-rare {
    border-color: #ffd93d;
    box-shadow: 0 0 15px rgba(255, 217, 61, 0.5);
}

.relic-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffd93d;
    margin-bottom: 8px;
    text-shadow: 0 0 3px rgba(255, 217, 61, 0.5);
}

.relic-description {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.4;
    margin-bottom: 8px;
}

.relic-rarity {
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
}

.floor-info {
    font-size: 1.2rem;
    font-weight: bold;
}

.game-content {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px;
    overflow-y: auto;
    min-height: 0;
}

/* 战斗区域 */
.battle-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0; /* 允许flex子元素收缩 */
}

.enemy-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    min-height: 200px;
}

.enemy-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.enemy {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 150px;
    max-width: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    overflow: hidden;
}

.enemy-avatar-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 6px 0;
}

.enemy-avatar {
    width: 120px;
    height: auto;
    max-height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.enemy-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.enemy-health {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 10px;
}

.enemy-intent {
    font-size: 0.9rem;
    opacity: 0.8;
}

.player-area {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    position: relative;
}

.player-avatar-battle {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.player-avatar-battle-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

.player-buffs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.buff-label {
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.status-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: help;
    transition: all 0.2s ease;
}

.status-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.status-icon {
    font-size: 1rem;
    line-height: 1;
}

.status-text {
    color: #fff;
    font-size: 0.8rem;
}

/* 状态类型颜色 */
.buff-positive {
    background: rgba(76, 175, 80, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.5);
}

.buff-neutral {
    background: rgba(158, 158, 158, 0.3);
    border: 1px solid rgba(158, 158, 158, 0.5);
}

.buff-negative {
    background: rgba(244, 67, 54, 0.3);
    border: 1px solid rgba(244, 67, 54, 0.5);
}

.buff-enemy {
    background: rgba(33, 150, 243, 0.3);
    border: 1px solid rgba(33, 150, 243, 0.5);
}

.buff-special {
    background: rgba(156, 39, 176, 0.3);
    border: 1px solid rgba(156, 39, 176, 0.5);
}

.enemy-status-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin: 10px 0;
}

.hand-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hand {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 卡牌样式 */
.card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 18px;
    min-width: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    text-align: left;
    position: relative;
    overflow: hidden;
    --card-type-color: linear-gradient(90deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--card-type-color);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.card.selected {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.card-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.2);
}

.card-cost {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 42px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.card-name {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}

.card-upgrade-indicator {
    margin-left: 6px;
    color: #ffd93d;
    text-shadow: 0 0 4px rgba(255, 217, 61, 0.7);
    font-size: 0.85rem;
}

.card-description {
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.card-type-badge.card-type-attack,
.deck-card.card-role-attack .card-type-badge {
    background: rgba(255, 107, 107, 0.25);
    border-color: rgba(255, 107, 107, 0.6);
    color: #ffeaea;
}

.card-type-badge.card-type-defend,
.deck-card.card-role-defend .card-type-badge {
    background: rgba(78, 205, 196, 0.25);
    border-color: rgba(78, 205, 196, 0.6);
    color: #eafffb;
}

.card-type-badge.card-type-skill,
.deck-card.card-role-skill .card-type-badge {
    background: rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.6);
    color: #eef0ff;
}

.card-type-badge.card-type-power,
.deck-card.card-role-power .card-type-badge {
    background: rgba(179, 136, 255, 0.25);
    border-color: rgba(179, 136, 255, 0.6);
    color: #f5ecff;
}

.card.card-role-attack,
.deck-card.card-role-attack {
    --card-type-color: linear-gradient(90deg, rgba(255, 138, 128, 0.9), rgba(255, 78, 80, 0.9));
}

.card.card-role-defend,
.deck-card.card-role-defend {
    --card-type-color: linear-gradient(90deg, rgba(78, 205, 196, 0.9), rgba(34, 193, 195, 0.9));
}

.card.card-role-skill,
.deck-card.card-role-skill {
    --card-type-color: linear-gradient(90deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
}

.card.card-role-power,
.deck-card.card-role-power {
    --card-type-color: linear-gradient(90deg, rgba(179, 136, 255, 0.9), rgba(124, 77, 255, 0.9));
}

.rarity-rare .card-name,
.rarity-rare .card-description {
    color: #fff7d6;
}

.rarity-rare .card-top,
.rarity-rare .card-cost {
    color: #fff3b0;
}

.rarity-rare .card-type-badge {
    border-color: rgba(255, 247, 214, 0.85);
    background: rgba(255, 218, 128, 0.35);
    color: #fff9db;
}

.reward-relic.rarity-rare .card-description,
.reward-card.rarity-rare .card-description {
    color: #fff5c7;
}

.reward-relic.rarity-rare .card-name,
.reward-card.rarity-rare .card-name {
    color: #fff9e3;
}

.card-description {
    white-space: normal;
}

/* 战斗日志 */
.battle-log {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    width: 300px;
    min-width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: hidden;
}

.battle-log h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.log-content {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.log-entry {
    color: white;
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.player-action {
    color: #4CAF50;
}

.log-entry.enemy-action {
    color: #ff6b6b;
}

.log-entry.system {
    color: #ffd93d;
}

.log-entry.turn-start {
    color: #2196F3;
    font-weight: bold;
}

/* 行动按钮 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-shrink: 0;
}

/* 汉府和商店界面 */
.screen-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.screen-content h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

/* 汉府和商店的角色状态显示 */
.hanfu-player-info,
.shop-player-info {
    background: rgba(103, 126, 234, 0.1);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hanfu-stats-details,
.shop-stats-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
}

.stat-detail {
    display: flex;
    gap: 15px;
    color: #555;
}

.stat-detail span {
    white-space: nowrap;
}

.deck-info-small {
    display: flex;
    align-items: center;
    color: #555;
    font-size: 0.9rem;
}

.hanfu-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.shop-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.shop-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.shop-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shop-item {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-item:hover {
    border-color: #4CAF50;
    background: #e8f5e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 商店物品稀有度边框 */
.shop-item.rarity-common {
    border-color: rgba(200, 200, 200, 0.5);
}

.shop-item.rarity-uncommon {
    border-color: #4ecdc4;
    box-shadow: 0 0 8px rgba(78, 205, 196, 0.3);
}

.shop-item.rarity-rare {
    border-color: #ffd93d;
    box-shadow: 0 0 10px rgba(255, 217, 61, 0.4);
}

.shop-item-info {
    flex: 1;
}

.shop-item-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.shop-item-description {
    font-size: 0.9rem;
    color: #666;
}

.shop-item-price {
    font-weight: bold;
    color: #ffd93d;
    font-size: 1.1rem;
}

/* 战斗结果 */
.result-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
    z-index: 100;
}

.rewards {
    margin: 20px 0;
}

.reward-item {
    background: #f0f0f0;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.result-actions button {
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 200;
    pointer-events: auto;
    background: #4CAF50;
    color: white;
}

.result-actions button:disabled {
    background: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

.result-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 游戏结束 */
.game-over-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
}

.final-stats {
    margin: 20px 0;
    font-size: 1.1rem;
}

.final-stats p {
    margin: 10px 0;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .character-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .character-card {
        width: 90%;
        max-width: 250px;
    }
    
    .character-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .hand {
        flex-direction: column;
        align-items: center;
    }
    
    .card {
        width: 100%;
        max-width: 200px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .player-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    /* 小屏幕时战斗日志移回下方 */
    .game-content {
        flex-direction: column;
    }
    
    .battle-log {
        width: 100%;
        min-width: 0;
        max-height: 300px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.screen.active {
    animation: fadeIn 0.5s ease-out;
}

.card {
    animation: slideIn 0.3s ease-out;
}

/* 卡牌升级界面样式 */
.upgrade-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.upgrade-info p {
    margin: 0;
    font-size: 1.1rem;
    color: #ffd700;
}

#upgrade-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    min-height: 200px;
}

.upgrade-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.upgrade-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
    border-color: #ffed4e;
}

.upgrade-card.card-upgrading {
    animation: cardUpgradeGlow 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes cardUpgradeGlow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 221, 89, 0);
    }
    40% {
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(255, 221, 89, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 221, 89, 0.4);
    }
}

.upgrade-card.selected {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    transform: scale(1.05);
}

.upgrade-card-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.upgrade-card-source {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.upgrade-card-diffs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #f7f7f7;
}

.stat-change.stat-description {
    flex-direction: column;
    align-items: flex-start;
}

.stat-description-content {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.8rem;
}

.description-before {
    color: rgba(255, 255, 255, 0.8);
    max-width: 220px;
}

.description-after {
    color: #4ef2a1;
    max-width: 220px;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(78, 242, 161, 0.4);
}

.stat-label {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.stat-arrow {
    color: #ffd700;
    font-size: 0.8rem;
}

.stat-value {
    font-weight: 600;
}

.stat-before {
    color: #ffd700;
}

.stat-after.stat-good {
    color: #4ef2a1;
    text-shadow: 0 0 6px rgba(78, 242, 161, 0.5);
}

.stat-after.stat-bad {
    color: #ff7676;
    text-shadow: 0 0 6px rgba(255, 118, 118, 0.4);
}

.stat-badge {
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.1);
}

.stat-badge.stat-good {
    color: #4ef2a1;
    border: 1px solid rgba(78, 242, 161, 0.6);
}

.stat-badge.stat-bad {
    color: #ff7676;
    border: 1px solid rgba(255, 118, 118, 0.6);
}

.upgrade-card-tip {
    margin-top: 10px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
}

.upgrade-card-cost {
    color: #ffd700;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.upgrade-card-description {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.upgrade-card-upgraded {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-color: #4CAF50;
    color: white;
}

.upgrade-card-upgraded::after {
    content: "已升级";
    position: absolute;
    top: -5px;
    right: -5px;
    background: #4CAF50;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.upgrade-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.upgrade-actions button {
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 药水菜单样式 */
.potion-menu-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.potion-menu-content h3 {
    text-align: center;
    margin-bottom: 20px;
    color: white;
    font-size: 1.5rem;
}

.potion-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.potion-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.potion-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffd700;
    transform: translateY(-2px);
}

.potion-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #ffd700;
}

.potion-description {
    font-size: 0.9rem;
    opacity: 0.9;
    color: white;
}

.potion-menu-content button {
    width: 100%;
    padding: 12px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.potion-menu-content button:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

/* 游戏头部按钮样式 */
.game-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.9rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 卡牌包查看界面样式 */
.deck-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.deck-info p {
    margin: 0;
    font-size: 1.1rem;
    color: #ffd700;
}

.deck-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.tab-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #ffd700;
    color: #333;
    border-color: #ffd700;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.deck-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.deck-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 18px;
    min-width: 150px;
    text-align: left;
    position: relative;
    color: white;
    overflow: hidden;
    --card-type-color: linear-gradient(90deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
}

.deck-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--card-type-color);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.deck-card-name {
    font-weight: bold;
    font-size: 1.05rem;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.deck-card-cost {
    color: #ffd700;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: none;
}

.deck-card-description {
    font-size: 0.85rem;
    opacity: 0.95;
    margin-top: 6px;
    position: relative;
    z-index: 1;
}

.deck-card .card-top {
    margin-bottom: 8px;
}

.deck-card .card-description {
    color: rgba(255, 255, 255, 0.9);
}

.deck-card-upgraded::after {
    content: "已升级";
    position: absolute;
    top: -5px;
    right: -5px;
    background: #4CAF50;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

.deck-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.deck-actions button {
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 卡牌选择弹窗 */
#card-choice-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#card-choice-modal.active {
    display: flex;
}

.card-choice-content {
    background: linear-gradient(135deg, #1f1c2c 0%, #928dab 100%);
    border-radius: 18px;
    padding: 24px;
    max-width: 720px;
    width: 92%;
    max-height: 80vh;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 20px 45px rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card-choice-title {
    font-size: 1.4rem;
    text-align: center;
    font-weight: bold;
}

.card-choice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    overflow-y: auto;
    padding: 5px;
}

.card-choice-list .deck-card,
.card-choice-list .reward-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-choice-list .deck-card:hover,
.card-choice-list .reward-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.card-choice-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* 胜利界面 */
#victory-screen {
    display: none;
}

#victory-screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.victory-content {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 22px;
    padding: 32px;
    max-width: 680px;
    width: 92%;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
}

.victory-story {
    background: rgba(103, 126, 234, 0.15);
    border-radius: 12px;
    padding: 16px;
    line-height: 1.6;
    color: #444;
    text-align: left;
}

.victory-score-block {
    background: rgba(118, 75, 162, 0.12);
    border-radius: 12px;
    padding: 18px;
    color: #333;
}

.victory-score-total {
    font-size: 2rem;
    font-weight: bold;
    color: #4A148C;
}

.victory-score-breakdown {
    list-style: none;
    margin: 15px 0 0;
    padding: 0;
    text-align: left;
    line-height: 1.6;
    color: #555;
}

.victory-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.victory-actions .btn-primary,
.victory-actions .btn-secondary {
    min-width: 140px;
}

/* 难度选择 */
.difficulty-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.difficulty-selector .difficulty-label {
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
}

.difficulty-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

.difficulty-badge {
    margin-top: 8px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 999px;
    font-size: 0.8rem;
    color: #ffe082;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.map-header .difficulty-badge {
    align-self: flex-start;
}

.game-header .difficulty-badge {
    margin-left: 12px;
}

.event-result {
    background: rgba(103, 126, 234, 0.12);
    border-left: 4px solid rgba(103, 126, 234, 0.6);
    padding: 14px 16px;
    margin-top: 18px;
    border-radius: 12px;
    color: #444;
    line-height: 1.6;
}
